package ListDemo;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2022-05-1
 * Time: 21:57
 */
public class Main {
    public static void main(String[] args) {
        MySingList mySingList = new MySingList();
        mySingList.addFirst(12);
        mySingList.addFirst(12);
        mySingList.addFirst(12);
        mySingList.addFirst(12);
        mySingList.addFirst(13);
        mySingList.addFirst(12);
        mySingList.Display();
        mySingList.clear();
        mySingList.Display();
    }
    public static void main7(String[] args) {
        Scanner scanner = new Scanner(System.in);
        scanner.close();//关闭输入流
    }
    public static void main6(String[] args) {
        MySingList mySingList = new MySingList();
        mySingList.CreateList();
        mySingList.Display();
        mySingList.clear();

        mySingList.Display();
    }
    public static void main5(String[] args) {
        MySingList mySingList = new MySingList();
        mySingList.CreateList();
        mySingList.remove(55);
        mySingList.remove(20);
        mySingList.remove(30);
        mySingList.Display();
    }
    public static void main4(String[] args) {
        MySingList mySingList = new MySingList();
        mySingList.CreateList();
        System.out.println(mySingList.contains(95));
    }
    public static void main3(String[] args) {
        MySingList mySingList = new MySingList();
        mySingList.addIndex(0,5);
        mySingList.addIndex(1,15);
        mySingList.addIndex(2,25);
        mySingList.addIndex(3,35);
        mySingList.Display();

    }
    public static void main2(String[] args) {
        MySingList mySingList = new MySingList();
        mySingList.CreateList();
        mySingList.Display();
        mySingList.addLast(5);
        mySingList.addLast(55);
        mySingList.addLast(555);
        mySingList.addLast(5555);
        mySingList.addLast(55555);
        mySingList.Display();
    }
    public static void main1(String[] args) {
        MySingList mySingList = new MySingList();
        mySingList.CreateList();
        mySingList.Display();
        mySingList.addFirst(5);
        mySingList.addFirst(55);
        mySingList.addFirst(555);
        mySingList.addFirst(55555);
        mySingList.Display();
    }
}